package com.alibaba.zihao.service;

import com.alibaba.zihao.domain.config;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

/**
 * Created by jason on 3/14/15.
 */
public class ZihaoWrite {

    FileWriter fw = null;

    public void write(String str) throws IOException {

        try {
            File file = new File(config.localFileOut);
            FileWriter fw = new FileWriter(file,true);
            fw.write(str);
            fw.flush();
            fw.close();
        }catch (Exception e){
            System.out.println(e);
            fw.close();
        }
    }

}
